package com.example.demo.service.Impl;

import com.example.demo.dao.IUserDao;
import com.example.demo.pojo.User;
import com.example.demo.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@SuppressWarnings({"all"})
@Service
public class UserServiceImpl implements IUserService {


    @Autowired
    private IUserDao userDao;

    @Override
    public User getUser(Integer id) {
        return userDao.getUser(id);
    }

    @Override
    public List<User> findAllUser() {
        return userDao.findAllUser();
    }

    @Override
    public Boolean insertUser(User user) {
        Boolean flag = false;
        System.out.println(user.getUserName());
        flag = userDao.insertUser(user);
        return flag;
    }

}
